% two sided for printing
\documentclass[a4paper,10pt,titlepage,oneside]{book} 
% one sided for online viewing twoside
%\documentclass[a4paper,10pt,oneside]{book} 

%--- PDF header ------------------------------------------------
\newif\ifpdf
  \ifx\pdfoutput\undefined \pdffalse    % we're not running PDFLaTeX
\else
  \pdftrue                              % we're running PDFLaTeX
  %\pdfcompresslevel=9                   % 9 = maximum, but slowest compression
  \def\pdfBorderAttrs{/Border [0 0 0] } % no borders arround links

\fi


\usepackage{graphicx}
\usepackage{packages/ETHkopf}    % requires graphicx

\ifpdf   % PDFLaTeX
\usepackage[
  colorlinks=true,        % links are colored
  citecolor=blue,         % color of cite links
  pagecolor=blue,         % color of page links
  linkcolor=blue,         % color of hyperref links
  menucolor=blue,         % color of Acrobat Reader menu buttons
  urlcolor=blue,          % color of urls \url{}
  bookmarks=true, hyperindex=true, breaklinks=true,
  baseurl={http://www.vision.ee.ethz.ch},
  pdftitle={Conversion of Geometric Models \ An Aproach to Converting Geometric Data},             
  pdfauthor={Claudio Botta},             
  pdfsubject={xxx},
  pdfkeywords={xxx}
]{hyperref}
\else    % LaTeX
  \usepackage[colorlinks=false]{hyperref}
\fi

\usepackage[english]{babel}
\usepackage{color}              % for colored text
\usepackage{xspace}             % for explicit spaces in abbreviations (\xspace)
\usepackage{moreverb}           % more verbatim: \begin{boxedverbatim} for source code
\usepackage{verbatim}           % for plain text
\usepackage{algorithm}          % for algorithms
\usepackage{algorithmic}        % for algorithms
\usepackage{multirow}           % for multi-rows in tables
\usepackage{cite}               % will become: [2], [5]--[7]  (using cite.sty)

\usepackage{float}
\usepackage{listings}
\usepackage{array}
\usepackage{makeidx,shortvrb,latexsym}
\usepackage{epsfig}
\usepackage[latin1]{inputenc}
\usepackage[hmarginratio=3:2]{geometry} %\usepackage{a4wide}
%\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{fancyhdr}
\usepackage{textcomp}  % \textmu
%\usepackage{dirtree}
\usepackage{lscape}
\usepackage{longtable}

%\usepackage{a4wide}
\usepackage{makeidx}
%\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{float}
\usepackage{textcomp}
\usepackage{alltt}
\usepackage[utf8]{inputenc}
\usepackage{doxygen}
% for algorithms
%\floatstyle{ruled}
%\newfloat{algorithm}{tb}{loa}  % loa: auxiliary file for list of algorithms
%\floatname{algorithm}{Algorithm}

% for metapost
\DeclareGraphicsRule{*}{mps}{*}{}

% nicer bullet points
\renewcommand{\labelitemii}{$\star$}

% --- Fancy header -------------------------------------------------
\pagestyle{fancyplain}
% with this we ensure that the chapter and section headings are in lowercase
\fancyhf{} % delete current setting for header and footer

\fancyhead[LE,RO]{\thepage}
\fancyhead[LO]{\rightmark}
\fancyhead[RE]{\leftmark}
\addtolength{\headheight}{1.6pt} % make space for the rule
\renewcommand{\headrulewidth}{0.5pt}
\fancypagestyle{plain}{
   \fancyhead{}  % get rid of headers on plain pages
   \renewcommand{\headrulewidth}{0pt} % and the line
}


% --- Definition of short-cuts/macros ------------------------------
\input{macros}   % include standard macros
\hyphenation{func-tion-al-ity}

\newenvironment{rootshell}{\begin{itemize}\renewcommand{\labelitemi}{\#}}{\end{itemize}}
\newenvironment{shell}{\begin{itemize}\renewcommand{\labelitemi}{\$}}{\end{itemize}}
\newcommand{\myifthen}[2]{\textbf{if} #1 \\ \hspace*{5mm}\textbf{then} #2}
\newcommand{\myifthenelse}[3]{\textbf{if} #1 \\ \hspace*{5mm}\textbf{then} #2 \\ \hspace*{5mm}\textbf{else} #3}
\newcommand{\myifthenelseindented}[3]{\hspace*{5mm}\textbf{if} #1 \\ \hspace*{10mm}\textbf{then} #2 \\ \hspace*{10mm}\textbf{else} #3}
\newcommand{\foreach}[3]{\textbf{foreach} \textit{#1} \textbf{in} #2: #3}

\definecolor{listinggray}{gray}{0.9}
\lstset{backgroundcolor=\color{listinggray}}

%deflist
\newcommand{\deflabel}[1]{\hfill\bf #1}
\newenvironment{deflist}[1]%
{\begin{list}{}%
{\settowidth{\labelwidth}{\bf #1}%
\setlength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}%
\renewcommand{\makelabel}{\deflabel}}}%
{\end{list}}

%deflist with left aligned labels
\newcommand{\deflabell}[1]{\bf#1 \hfill}
\newenvironment{deflistl}[1]%
{\begin{list}{}%
{\settowidth{\labelwidth}{\bf#1 }%
\setlength{\leftmargin}{\labelwidth}%
\addtolength{\leftmargin}{\labelsep}%
\renewcommand{\makelabel}{\deflabell}}}%
{\end{list}}

\definecolor{lightgray}{rgb}{.75,.75,1.0}
\lstset{backgroundcolor=\color{lightgray}}

%=== DOCUMENT BEGIN ==============================================
\begin{document}
\frontmatter

\title{Conversion of Geometric Models}
\author{Claudio Botta}
\date{Spring Term 2008}

\begin{titlepage}
  \input{chapters/title}
\end{titlepage}

%=================================================================
\input{chapters/preface}

\tableofcontents
\listoffigures % generates an error
\listoftables
%\listof{algorithm}{List of Algorithms}

%=================================================================
\mainmatter
%\input{chapters/task}
\input{chapters/introduction}
\input{chapters/ConversionOO}

%\input{chapters/Conversions} What's this chapter supposed to contain ?

\input{chapters/ConversionOfGeometricData}

%\input{chapters/ConversionGraphs}
\input{chapters/geomagick}
\input{chapters/Conclusions}

% \input{chapter/Implementation}


\appendix
\input{chapters/HOWTO.tex}



\chapter{Code Documentation}

\begin{center}
{\Large geomagick \\[1ex]\large 0.01 }\\
\vspace*{1cm}
{\large Generated by Doxygen 1.5.5}\\
\vspace*{0.5cm}
{\small Mon Jul 7 15:05:14 2008}\\
\end{center}

\input{chapters/doxygen/hierarchy}

\input{chapters/doxygen/annotated}

\input{chapters/doxygen/classgeomagick_1_1BaseType}
\include{chapters/doxygen/classgeomagick_1_1Conversion}
\include{chapters/doxygen/classgeomagick_1_1ConversionGraph}
\include{chapters/doxygen/classgeomagick_1_1ConversionManager}
\include{chapters/doxygen/classgeomagick_1_1ConversionRoute}
\include{chapters/doxygen/classCylinder}
\include{chapters/doxygen/classgeomagick_1_1Nurbs}
\include{chapters/doxygen/classNurbsTesselator}
\include{chapters/doxygen/classgeomagick_1_1Polygon}
\include{chapters/doxygen/classgeomagick_1_1Polygons}
\include{chapters/doxygen/classgeomagick_1_1Polygons2WingedEdges}
\include{chapters/doxygen/classPrimitives}
\include{chapters/doxygen/classSphere}
\include{chapters/doxygen/classgeomagick_1_1Triangle}
\include{chapters/doxygen/classTriangleFan}
\include{chapters/doxygen/classgeomagick_1_1Triangles}
\include{chapters/doxygen/classTriangleStrip}
\include{chapters/doxygen/classgeomagick_1_1Triangulizer}
\include{chapters/doxygen/classgeomagick_1_1Vector3d}
\include{chapters/doxygen/classgeomagick_1_1WEdge}
\include{chapters/doxygen/classgeomagick_1_1WEVertex}
\include{chapters/doxygen/classgeomagick_1_1WingedEdges}
\include{chapters/doxygen/classgeomagick_1_1WingedEdges2Polygons}
\include{chapters/doxygen/classWingedEdges2Polygons}

% Doxygen...
%\input{chapters/doxystuff}
% License
% Disclaimer ...


%=================================================================
\addcontentsline {toc}{chapter}{Bibliography} 
%\nocite{*}
\bibliographystyle{IEEEtran}
\bibliography{IEEEabrv,report}

\end{document}
